package com.navi.loaddata.core.mesEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.io.Serializable;

/**
 * Created by Jay on 2018/3/8.
 */
@Entity
public class MesProcessoperationspecPK implements Serializable {
    private String factoryname;
    private String processoperationname;
    private String processoperationversion;

    @Id
    @Column(name = "FACTORYNAME")
    public String getFactoryname() {
        return factoryname;
    }

    public void setFactoryname(String factoryname) {
        this.factoryname = factoryname;
    }

    @Id
    @Column(name = "PROCESSOPERATIONNAME")
    public String getProcessoperationname() {
        return processoperationname;
    }

    public void setProcessoperationname(String processoperationname) {
        this.processoperationname = processoperationname;
    }

    @Id
    @Column(name = "PROCESSOPERATIONVERSION")
    public String getProcessoperationversion() {
        return processoperationversion;
    }

    public void setProcessoperationversion(String processoperationversion) {
        this.processoperationversion = processoperationversion;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        MesProcessoperationspecPK that = (MesProcessoperationspecPK) o;

        if (factoryname != null ? !factoryname.equals(that.factoryname) : that.factoryname != null) return false;
        if (processoperationname != null ? !processoperationname.equals(that.processoperationname) : that.processoperationname != null)
            return false;
        if (processoperationversion != null ? !processoperationversion.equals(that.processoperationversion) : that.processoperationversion != null)
            return false;


        return true;
    }

    @Override
    public int hashCode() {
        int result = factoryname != null ? factoryname.hashCode() : 0;
        result = 31 * result + (processoperationname != null ? processoperationname.hashCode() : 0);
        result = 31 * result + (processoperationversion != null ? processoperationversion.hashCode() : 0);
        return result;
    }
}
